Repository navigation
test: two flakes from PR #136's runs, classified and fixed - #138
Merged
Merged
Conversation
…iltering; the terminal test reads to the terminal's end instead of waiting out a quiet spell test_control_a_stop_that_gives_energy_fails_the_balance_on_every_draw threw away the draws that reach no stop at all three step sizes, and Hypothesis's filter_too_much health check tripped in one stress run (a strategy that does not draw what the test needs). The control's draws now put one joint at a stop its own motion reaches (torque raised until the joint's acceleration toward the stop is at least ACCELERATION, taken at the stop), and the preconditions are assertions, so a construction that fails is loud and not filtered. The other tests' draws are unchanged. test_a_scripted_session_on_a_terminal_... judged the screen after waiting 0.5 s without a read; a reader held up for longer than that (a loaded runner) lost the end of what the child wrote and read "the live region is gone". finish() now waits for the reader to see the terminal's end, bounded at 30 s. Reproduced by holding the reader up for 3 s after the signal; the code under test flushes the clear before it exits (the view's close drains its writer), so it is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ures test_control_a_guard_no_point_reaches_false_or_a_nonzero_norm_at_zero_fails (1.6 to 1.8 min on CI) and test_the_control_a_folder_with_no_duration_still_needs_one (28.8 s) failed v0.3's own push run 41767802990. Each is measured alone, cold and warm, with CI's cache settings; the first repeats the guard points its sibling reaches (a dev2 line to make it faster). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One allowlist entry for test_the_control_a_folder_with_no_duration_still_needs_one, this branch's (its figures are fuller than the one #136 added). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
NicholasEhsanRoy
added a commit
that referenced
this pull request
Nov 4, 2026
Conflicts: src/mime/docs/_check.py takes both imports; src/mime/docs/README.md both bullets (the executable-docs check, the evidence counts); tests/duration_allowlist.txt both sides, no test twice; tests/test_ci_wiring.py one guard over every workflow: a `mime docs check` skip flag only in the jobs SKIPPABLE names (this branch), and `mime docs build` with no skip flag at all (v0.3), both read through docs_commands. Two clashes the merge did not show: BuildReport gained `assets` (#136), so the build report page has its heading; the AR4 URDF moved to examples/descriptions/ar4/ (#136), so tutorial A0 reads it there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NicholasEhsanRoy
added a commit
that referenced
this pull request
Nov 4, 2026
…rts a live display of its own each time it comes back test_a_scripted_session_on_a_terminal_... failed with "the live region is gone" on CI after #138 (PR #126's run 41839710392, [60]; PR #136's run 41762639938, [100]). The failure message showed no frames, so the test now prints, on a failure of its end checks, the screen after the stop and what the terminal received where the strip was first drawn and at its end, each bounded, and whether the reader saw the terminal's end. Reproduced naturally with that capture: the session test at its three widths beside test_serve_view.py, three pytest runs at once on two xdist workers each, all under taskset on four cores with two busy loops of our own. The transcript shows the cause. rich's live display finds the top of its region from the height it was last drawn at, under its own lock, and draws the region again only after letting that lock go. Serve's ready line (the serve loop's thread) and the view's draw (its own thread) each wrote the same stale reset, the second erasing only part of the region the first had drawn: five lines of a READY frame, "Ctrl+C to stop" among them, stayed in the scrollback. The end of the transcript was complete and the reader saw the terminal's end, so the clear was not lost. Every print through the view's console now holds the lock its draws hold (_ordered_console): serve's own lines, the events, the draws and writes to the redirected standard streams come one after the other. The same transcript showed a second defect of the same kind: the view kept one live display across the pause around the load report, whose shape was the spinner's, so the first line once the view was back erased the report's last line wherever the building phase takes two lines (60 and 80 columns, every run). The view now starts a live display of its own each time it comes back. Tests (tests/cli/test_serve_view.py), each with a control that fails its check on every run: a draw made on another thread while the ready line is being printed, between its reset and its region, leaves no frame of the strip (the control: a console whose prints are not ordered with the draws); and the first line once the view is back erases nothing printed while it was away (the control: one live display kept across the pause). Both fail on every run on the code before this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two flakes seen on PR #136's CI runs (neither test was changed there beyond a file path).
tests/oracles/test_dynamic_arm.py::test_control_a_stop_that_gives_energy_fails_the_balance_on_every_drawfailed Hypothesis'sfilter_too_muchhealth check (stress run 5 of 20, seed 96738843). CLAUDE.md's first cause: a strategy that does not draw what the test needs. Itsassumethrew away the draws that reach no stop at all three step sizes; the old way of making a draw (sign the speed and the torque toward the stop) left a joint that the weight or the coupling carried away from it, in a third to a half of the draws. The control's draws now come frominto_a_stop: one joint at a stop, the torque raised until the joint's own acceleration toward it is at leastACCELERATION(taken at the stop), the joint placed 10 to 50 % of the run's travel from it. The example count is unchanged and the other tests' draws are unchanged (runs(name)draws as before). The two preconditions are assertions now: a draw that does not reach a stop is a defect of the construction and loud, not filtered.tests/cli/test_serve_terminal.py::test_a_scripted_session_on_a_terminal_shows_each_event_once_above_a_strip_that_follows_the_status[100]read the pseudo-terminal's last frame before the live region was cleared.finish()waited until the reader had read nothing for 0.5 s and then stopped it, so a reader held up for longer (a loaded runner) lost the end of what the child had written. It now waits for the reader to see the terminal's own end (the child's last descriptor closed and everything before it read), bounded at 30 s; a reader stopped on purpose (the unread-terminal arms) returns at once. Not reproduced by 96 runs under load (24 at once, and 16 at once on 4 cores); reproduced by holding the reader up for 3 s from the signal (the old file fails with the same message at 3 s and 6 s; the new file passes at 3, 6 and 15 s). The code under test has no ordering bug:ServeDisplay.close()drains its writer before the process returns, and a write the terminal does not take withinCLOSE_WAITis dropped and counted by design (tested by the unread-terminal arms), so the source is unchanged.Claim hygiene: the 3 s stall is an injected control that shows the mechanism is sufficient, not that a runner stalled so; the failing run's transcript was not captured.
Two tests over the 20 s line, allowlisted (v0.3's own push run 41767802990 is red on both, and so was this PR's first full run on the first):
tests/saved/test_switch_harness.py::test_control_a_guard_no_point_reaches_false_or_a_nonzero_norm_at_zero_fails: 1.8 min (50 % running) in run 41767802990 (3.14 shard 10), 1.7 min in feat(assets): records travel with what needs them, open locations through adapters, the tier per asset, the guard, the AR4 out of the library #136's run 41762639938, 1.6 min here. Alone with CI's cache settings: 68.8 s cold (31.1 s compiling, 16.0 s tracing, 3.1 s lowering) and 38.4 s warm (2.5 s compiling, 15.6 s tracing, 2.7 s lowering, the rest its own running), so a warm cache removes the compile and nothing else.tests/saved/test_duration_saved.py::test_the_control_a_folder_with_no_duration_still_needs_one: 28.8 s (88 % running) in run 41767802990 (3.12 shard 9). Alone: 11.0 s cold, 8.9 s warm (0.4 s compiling warm), with 77 to 85 CPU seconds in that wall time: its two real runs' multi-threaded compute, 19 s or more on a 4-core runner, which no cache removes.To make faster (dev2): the guard control nearly two minutes on CI. It reaches every guard point again, the same list the test before it (also listed, 1.2 min) reaches; one module fixture reaching them once would serve both.
🤖 Generated with Claude Code